<template>
  <div class="about-container">
    <div class="about-hero">
      <div class="about-hero-content">
        <h1>关于我们的二手交易平台</h1>
        <p>打造安全、便捷、高效的二手商品交易体验</p>
      </div>
    </div>

    <div class="about-content">
      <!-- 我们的使命 -->
      <section class="about-section">
        <div class="section-icon">
          <svg width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
            <path d="M12 20V10M12 4l8 8-8 8"/>
          </svg>
        </div>
        <h2>我们的使命</h2>
        <p>我们致力于为用户提供一个值得信赖的二手交易平台，让闲置物品流转起来，实现资源的可持续利用，同时为买家提供高性价比的商品选择。</p>
      </section>

      <!-- 核心价值 -->
      <section class="about-values">
        <h2>核心价值</h2>
        <div class="values-grid">
          <div class="value-card">
            <div class="value-icon">
              <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"/>
                <polyline points="22 4 12 14.01 9 11.01"/>
              </svg>
            </div>
            <h3>诚信为本</h3>
            <p>建立用户信用体系，确保交易安全透明</p>
          </div>
          <div class="value-card">
            <div class="value-icon">
              <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M12 20h9M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"/>
              </svg>
            </div>
            <h3>便捷高效</h3>
            <p>简化交易流程，让买卖双方轻松完成交易</p>
          </div>
          <div class="value-card">
            <div class="value-icon">
              <svg width="40" height="40" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <circle cx="12" cy="12" r="10"/>
                <line x1="12" y1="8" x2="12" y2="12"/>
                <line x1="12" y1="16" x2="12.01" y2="16"/>
              </svg>
            </div>
            <h3>社区共建</h3>
            <p>构建互助互信的社区氛围，促进资源共享</p>
          </div>
        </div>
      </section>

      <!-- 平台优势 -->
      <section class="about-advantages">
        <div class="advantage-item">
          <div class="advantage-image">
            <svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
              <circle cx="8.5" cy="8.5" r="1.5"/>
              <polyline points="21 15 16 10 5 21"/>
            </svg>
          </div>
          <div class="advantage-content">
            <h3>实名认证</h3>
            <p>所有用户均需实名认证，保障交易安全，杜绝欺诈行为</p>
          </div>
        </div>
        <div class="advantage-item advantage-item-reverse">
          <div class="advantage-image">
            <svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M12 20h9M7.83 21a2 2 0 0 1-1.83-1.17L3 4a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2l-3.07 15.83A2 2 0 0 1 16.17 21H7.83z"/>
            </svg>
          </div>
          <div class="advantage-content">
            <h3>智能推荐</h3>
            <p>基于用户偏好智能推荐相关商品，提高交易成功率</p>
          </div>
        </div>
        <div class="advantage-item">
          <div class="advantage-image">
            <svg width="64" height="64" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
              <path d="M21 11.5a8.38 8.38 0 0 1-.9 3.8 8.5 8.5 0 0 1-7.6 4.7 8.38 8.38 0 0 1-3.8-.9L3 21l1.9-5.7a8.38 8.38 0 0 1-.9-3.8 8.5 8.5 0 0 1 4.7-7.6 8.38 8.38 0 0 1 3.8-.9h.5a8.48 8.48 0 0 1 8 8v.5z"/>
            </svg>
          </div>
          <div class="advantage-content">
            <h3>交易保障</h3>
            <p>提供交易纠纷调解服务，保障买卖双方的合法权益</p>
          </div>
        </div>
      </section>

      <!-- 联系我们 -->
      <section class="about-contact">
        <h2>联系我们</h2>
        <div class="contact-container">
          <div class="contact-info">
            <p>如果您对我们的平台有任何问题或建议，欢迎随时联系我们。我们的团队将竭诚为您服务。</p>
            <div class="contact-details">
              <div class="contact-item">
                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                  <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/>
                  <polyline points="22,6 12,13 2,6"/>
                </svg>
                <span>contact@example.com</span>
              </div>
              <div class="contact-item">
                <svg width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                  <path d="M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z"/>
                </svg>
                <span>400-123-4567</span>
              </div>
            </div>
          </div>
          <div class="contact-form">
            <form @submit.prevent="handleSubmit">
              <div class="form-group">
                <label for="name">姓名</label>
                <input type="text" id="name" v-model="contactForm.name" placeholder="请输入您的姓名" required/>
              </div>
              <div class="form-group">
                <label for="email">邮箱</label>
                <input type="email" id="email" v-model="contactForm.email" placeholder="请输入您的邮箱" required/>
              </div>
              <div class="form-group">
                <label for="message">留言</label>
                <textarea id="message" v-model="contactForm.message" placeholder="请输入您的留言" rows="4" required></textarea>
              </div>
              <button type="submit" class="submit-button">提交留言</button>
            </form>
          </div>
        </div>
      </section>
    </div>
  </div>
</template>

<script>
import { ref } from 'vue'

export default {
  name: 'AboutView',
  setup() {
    const contactForm = ref({
      name: '',
      email: '',
      message: ''
    })

    const handleSubmit = () => {
      // 这里可以添加表单提交逻辑
      alert('感谢您的留言，我们会尽快回复您！')
      contactForm.value = {
        name: '',
        email: '',
        message: ''
      }
    }

    return {
      contactForm,
      handleSubmit
    }
  }
}
</script>

<style scoped>
/* 关于页面容器 */
.about-container {
  background-color: var(--color-background);
  min-height: 100vh;
}

/* 英雄区域 */
.about-hero {
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
  padding: var(--spacing-xxl) var(--spacing-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.about-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 10%, transparent 10.5%);
  background-size: 20px 20px;
  animation: moveBackground 30s linear infinite;
}

@keyframes moveBackground {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.about-hero-content {
  position: relative;
  z-index: 1;
}

.about-hero h1 {
  font-size: 2.5rem;
  margin-bottom: var(--spacing-md);
  font-weight: 700;
}

.about-hero p {
  font-size: 1.25rem;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* 内容区域 */
.about-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--spacing-xl) var(--spacing-lg);
}

/* 通用部分样式 */
.about-section {
  text-align: center;
  margin-bottom: var(--spacing-xxl);
  padding: var(--spacing-xl);
  background: white;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-normal);
}

.about-section:hover {
  box-shadow: var(--shadow-md);
}

.about-section h2 {
  color: var(--color-heading);
  font-size: 2rem;
  margin-bottom: var(--spacing-md);
  position: relative;
  display: inline-block;
}

.about-section h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  border-radius: var(--radius-full);
}

.about-section p {
  color: var(--color-text-secondary);
  font-size: 1.05rem;
  line-height: 1.7;
  max-width: 800px;
  margin: 0 auto;
}

.section-icon {
  margin-bottom: var(--spacing-lg);
  color: var(--color-primary);
  animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 核心价值 */
.about-values {
  text-align: center;
  margin-bottom: var(--spacing-xxl);
}

.about-values h2 {
  color: var(--color-heading);
  font-size: 2rem;
  margin-bottom: var(--spacing-xl);
  position: relative;
  display: inline-block;
}

.about-values h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  border-radius: var(--radius-full);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-lg);
}

.value-card {
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-normal);
  text-align: center;
  border-top: 3px solid var(--color-primary);
}

.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.value-icon {
  margin-bottom: var(--spacing-md);
  color: var(--color-primary);
}

.value-card h3 {
  color: var(--color-heading);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.value-card p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

/* 平台优势 */
.about-advantages {
  margin-bottom: var(--spacing-xxl);
}

.about-advantages h2 {
  color: var(--color-heading);
  font-size: 2rem;
  margin-bottom: var(--spacing-xl);
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.about-advantages h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  border-radius: var(--radius-full);
}

.advantage-item {
  display: flex;
  align-items: center;
  background: white;
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin-bottom: var(--spacing-lg);
  transition: box-shadow var(--transition-normal);
  gap: var(--spacing-lg);
}

.advantage-item:hover {
  box-shadow: var(--shadow-md);
}

.advantage-image {
  color: var(--color-primary);
  flex-shrink: 0;
}

.advantage-content h3 {
  color: var(--color-heading);
  font-size: 1.25rem;
  margin-bottom: var(--spacing-sm);
  font-weight: 600;
}

.advantage-content p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
}

.advantage-item-reverse {
  flex-direction: row-reverse;
}

/* 联系我们 */
.about-contact {
  background: white;
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.about-contact h2 {
  color: var(--color-heading);
  font-size: 2rem;
  margin-bottom: var(--spacing-xl);
  text-align: center;
  position: relative;
  display: inline-block;
  left: 50%;
  transform: translateX(-50%);
}

.about-contact h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary-light), var(--color-primary));
  border-radius: var(--radius-full);
}

.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-xl);
}

.contact-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-info p {
  color: var(--color-text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: var(--spacing-lg);
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
  color: var(--color-text-primary);
  font-size: 0.95rem;
}

.contact-item svg {
  color: var(--color-primary);
  flex-shrink: 0;
}

.contact-form {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.contact-form .form-group {
  margin-bottom: var(--spacing-md);
}

.contact-form label {
  display: block;
  margin-bottom: var(--spacing-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
  font-size: 0.875rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  transition: all var(--transition-normal);
  background-color: var(--color-background-light);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  background-color: white;
  box-shadow: 0 0 0 4px rgba(66, 185, 131, 0.1);
}

.contact-form textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.5;
}

.submit-button {
  width: 100%;
  padding: 0.875rem;
  background: linear-gradient(135deg, var(--color-primary-light), var(--color-primary));
  color: white;
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  font-size: 1rem;
  font-weight: 600;
  transition: all var(--transition-normal);
  box-shadow: 0 2px 4px rgba(66, 185, 131, 0.2);
}

.submit-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(66, 185, 131, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
  .about-hero h1 {
    font-size: 2rem;
  }
  
  .about-hero p {
    font-size: 1rem;
  }
  
  .about-content {
    padding: var(--spacing-lg) var(--spacing-md);
  }
  
  .about-section,
  .about-values,
  .about-advantages,
  .about-contact {
    margin-bottom: var(--spacing-lg);
  }
  
  .about-section h2,
  .about-values h2,
  .about-advantages h2,
  .about-contact h2 {
    font-size: 1.5rem;
  }
  
  .advantage-item,
  .advantage-item-reverse {
    flex-direction: column;
    text-align: center;
  }
  
  .contact-container {
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
  }
  
  .values-grid {
    gap: var(--spacing-md);
  }
}
</style>
